<?php
/**
 * Common Template - tpl_main_page.php
 *
 * Governs the overall layout of an entire page<br />
 * Normally consisting of a header, left side column. center column. right side column and footer<br />
 * For customizing, this file can be copied to /templates/your_template_dir/pagename<br />
 * example: to override the privacy page<br />
 * - make a directory /templates/my_template/privacy<br />
 * - copy /templates/templates_defaults/common/tpl_main_page.php to /templates/my_template/privacy/tpl_main_page.php<br />
 * <br />
 * to override the global settings and turn off columns un-comment the lines below for the correct column to turn off<br />
 * to turn off the header and/or footer uncomment the lines below<br />
 * Note: header can be disabled in the tpl_header.php<br />
 * Note: footer can be disabled in the tpl_footer.php<br />
 * <br />
 * $flag_disable_header = true;<br />
 * $flag_disable_left = true;<br />
 * $flag_disable_right = true;<br />
 * $flag_disable_footer = true;<br />
 * <br />
 * // example to not display right column on main page when Always Show Categories is OFF<br />
 * <br />
 * if ($current_page_base == 'index' and $cPath == '') {<br />
 *  $flag_disable_right = true;<br />
 * }<br />
 * <br />
 * example to not display right column on main page when Always Show Categories is ON and set to categories_id 3<br />
 * <br />
 * if ($current_page_base == 'index' and $cPath == '' or $cPath == '3') {<br />
 *  $flag_disable_right = true;<br />
 * }<br />
 *
 * @package templateSystem
 * @copyright Copyright 2003-2006 Zen Cart Development Team
 * @copyright Portions Copyright 2003 osCommerce
 * @license http://www.zen-cart.com/license/2_0.txt GNU Public License V2.0
 * @version $Id: tpl_main_page.php 3856 2006-06-29 02:26:33Z drbyte $
 */

// the following IF statement can be duplicated/modified as needed to set additional flags
  if (in_array($current_page_base,explode(",",'list_pages_to_skip_all_right_sideboxes_on_here,separated_by_commas,and_no_spaces')) ) {
    $flag_disable_right = true;
  }


  $header_template = 'tpl_header.php';
  $footer_template = 'tpl_footer.php';
  $left_column_file = 'column_left.php';
  $right_column_file = 'column_right.php';
  $body_id = str_replace('_', '', $_GET['main_page']);
?>
<body id="<?php echo $body_id . 'Body'; ?>"<?php if($zv_onload !='') echo ' onload="'.$zv_onload.'"'; ?>>
  <table align="center" width="770" border="0" cellpadding="0" cellspacing="0" bgcolor="#7E4B26">
    <tr>
      <td><table width="100%" border="0" cellspacing="0" cellpadding="0">
        <tr>
          <td><img src="<? echo DIR_WS_TEMPLATE; ?>images/top.gif" width="770" height="49" alt="" /></td>
        </tr>
        <tr>
          <td><table width="100%" border="0" cellspacing="0" cellpadding="0">
            <tr>
              <td width="138" valign="top"><img src="<? echo DIR_WS_TEMPLATE; ?>images/mainpix01.gif" width="138" height="289" alt="" /></td>
              <td valign="top"><table width="100%" border="0" cellspacing="0" cellpadding="0">
                <tr>
                  <td height="62" bgcolor="#CF934C"><table width="100%" border="0" cellspacing="0" cellpadding="0">
                    <tr>
                      <td><table width="95%" border="0" align="center" cellpadding="0" cellspacing="0">
                        <tr>
                          <td width="15"><img src="<? echo DIR_WS_TEMPLATE; ?>images/icon_arrow.gif" width="5" height="6" alt="" /></td>
                          <td height="15" class="txt_content"><a href="index.php?main_page=specials">Specials</a></td>
                        </tr>
                        <tr>
                          <td><img src="<? echo DIR_WS_TEMPLATE; ?>images/icon_arrow.gif" width="5" height="6" alt="" /></td>
                          <td height="15" class="txt_content"><a href="index.php?main_page=create_account">Create Account</a> </td>
                        </tr>
                        <tr>
                          <td><img src="<? echo DIR_WS_TEMPLATE; ?>images/icon_arrow.gif" width="5" height="6" alt="" /></td>
                          <td height="15" class="txt_content"><a href="index.php?main_page=login">Customer Login</a> </td>
                        </tr>
                      </table></td>
                      <td width="10"><img src="<? echo DIR_WS_TEMPLATE; ?>images/line00.gif" width="10" height="49" alt="" /></td>
                      <td><table width="80%" border="0" align="center" cellpadding="0" cellspacing="0">
                        <tr>
                          <td height="25"><span class="txt_content">Choose Language: </span></td>
                        </tr>
                        <tr>
                          <td><?php require(DIR_WS_TEMPLATE .('modules/languages.php')); ?></td>
                        </tr>
                      </table></td>
                      <td width="10"><img src="<? echo DIR_WS_TEMPLATE; ?>images/line00.gif" width="10" height="49" alt="" /></td>
                      <td><table width="80%" border="0" align="center" cellpadding="0" cellspacing="0">
                        <tr>
                          <td height="25"><span class="txt_content">Currencies: </span></td>
                        </tr>
                        <tr>
                          <td><?php require(DIR_WS_TEMPLATE .('modules/currencies.php')); ?></td>
                        </tr>
                      </table></td>
                      <td width="14"><img src="<? echo DIR_WS_TEMPLATE; ?>images/line01.gif" width="14" height="62" alt="" /></td>
                    </tr>
                  </table></td>
                </tr>
                <tr>
                  <td><img src="<? echo DIR_WS_TEMPLATE; ?>images/mainpix02.gif" width="421" height="227" alt="" /></td>
                </tr>
              </table></td>
              <td width="212" valign="top"><table width="100%" border="0" cellspacing="0" cellpadding="0">
                <tr>
                  <td><table width="100%" border="0" cellspacing="0" cellpadding="0">
                      <tr>
                        <td bgcolor="#CF934C"><table width="75%" border="0" align="center" cellpadding="0" cellspacing="0">
                          <tr>
                            <td height="20"><span class="txt_content">Quick Search </span></td>
                          </tr>                          
                          <tr>
                            <td height="20" class="txt_content01"><?php require(DIR_WS_TEMPLATE .('modules/search.php')); ?></td>
                          </tr>
                        </table></td>
                        <td width="15"><img src="<? echo DIR_WS_TEMPLATE; ?>images/side01.gif" width="15" height="62" alt="" /></td>
                      </tr>
                  </table></td>
                </tr>
                <tr>
                  <td><table width="100%" border="0" cellspacing="0" cellpadding="0">
                      <tr>
                        <td><table width="100%" border="0" cellspacing="0" cellpadding="0">
                            <tr>
                              <td><a href="index.php"><img src="<? echo DIR_WS_TEMPLATE; ?>images/but01.gif" width="196" height="41" border="0" alt="" /></a></td>
                            </tr>
                            <tr>
                              <td><a href="index.php?main_page=products_new"><img src="<? echo DIR_WS_TEMPLATE; ?>images/but02.gif" width="196" height="36" border="0" alt="" /></a></td>
                            </tr>
                            <tr>
                              <td><a href="index.php?main_page=login"><img src="<? echo DIR_WS_TEMPLATE; ?>images/but03.gif" width="196" height="44" border="0" alt="" /></a></td>
                            </tr>
                            <tr>
                              <td><a href="index.php?main_page=shopping_cart"><img src="<? echo DIR_WS_TEMPLATE; ?>images/but04.gif" width="196" height="38" border="0" alt="" /></a></td>
                            </tr>
                            <tr>
                              <td><a href="index.php?main_page=contact_us"><img src="<? echo DIR_WS_TEMPLATE; ?>images/but05.gif" width="196" height="41" border="0" alt="" /></a></td>
                            </tr>
                            <tr>
                              <td><img src="<? echo DIR_WS_TEMPLATE; ?>images/but06.gif" width="196" height="27" alt="" /></td>
                            </tr>
                        </table></td>
                        <td width="15"><img src="<? echo DIR_WS_TEMPLATE; ?>images/side02.gif" width="15" height="227" alt="" /></td>
                      </tr>
                  </table></td>
                </tr>
              </table></td>
            </tr>
          </table></td>
        </tr>
        <tr>
          <td><table width="100%" border="0" cellspacing="0" cellpadding="0">
            <tr>
              <td height="544" valign="top"><table width="100%" border="0" cellspacing="0" cellpadding="0">
                <tr>
                  <td width="556"><table width="100%" border="0" cellspacing="0" cellpadding="0">
				  	
                    <tr>
                      <td class="bg_shop"><table width="100%" border="0" align="center" cellpadding="0" cellspacing="0">
                        <tr>
						<td colspan="2"><img src="<? echo DIR_WS_TEMPLATE; ?>images/spacer.gif" width="197" height="1" alt="" /></td>
					</tr>
						<tr>
						
                          <td width="40" class="shop_padding"><img src="<? echo DIR_WS_TEMPLATE; ?>images/icon_cart.gif" width="34" height="34" alt="" /></td>
                          <td><span class="txt_content">Your Shopping Cart</span><br />
                              <span class="txt_content01">in your cart</span> <span class="txt_content02"><?php require(DIR_WS_TEMPLATE .('modules/shopping_cart.php')); ?> ITEMS</span></td>
                        </tr>
                      </table></td>
                      <td valign="top"><table width="100%" border="0" cellspacing="0" cellpadding="0">
                          <tr>
                            <td><table width="100%" border="0" cellspacing="0" cellpadding="0">
                                <tr>
                                  <td valign="bottom" class="bg_title" width="358" align="right"><table width="100%" border="0" cellspacing="0" cellpadding="0">
                                    <tr>
										<td><img src="<? echo DIR_WS_TEMPLATE; ?>images/spacer.gif" width="358" height="1" alt="" /></td>
									</tr>
									<tr>
                                      <td height="20" valign="bottom" class="txt_content02 title"><div align="right"><? echo HEADING_TITLE; ?></div></td>
                                    </tr>
                                  </table></td>
                                </tr>
                                <tr>
                                  <td width="358" align="right"><img src="<? echo DIR_WS_TEMPLATE; ?>images/line02.gif" width="358" height="8" alt="" /></td>
                                </tr>
                            </table></td>
                          </tr>
                      </table></td>
                    </tr>
                  </table></td>
                </tr>
                <tr>
                  <td class="bg_main" width="558"><table width="100%" border="0" cellspacing="0" cellpadding="0">
                    <tr>
                      <td width="20">&nbsp;</td>
                      <td><table width="100%" border="0" cellspacing="0" cellpadding="0">
                        <tr>
                          <td><table width="100%"  border="0" cellspacing="0" cellpadding="0">
                            <tr>
							<!--TABEL KIRI-->
<?php
if (COLUMN_LEFT_STATUS == 0 or (CUSTOMERS_APPROVAL == '1' and $_SESSION['customer_id'] == '')) {
  // global disable of column_right
  $flag_disable_left = true;
}
if (!isset($flag_disable_left) || !$flag_disable_left) {
?>
                              <td valign="top"><?php require(DIR_WS_TEMPLATE .('modules/column_left.php')); ?></td>
<?php
}
?> 
<!--/TABEL KIRI--> 
                              <td valign="top"><?php if (DEFINE_BREADCRUMB_STATUS == '1') { ?>
                              <?php } ?>
                              <!-- eof breadcrumb -->
                              <?php
  if (SHOW_BANNERS_GROUP_SET3 != '' && $banner = zen_banner_exists('dynamic', SHOW_BANNERS_GROUP_SET3)) {
    if ($banner->RecordCount() > 0) {
?>
                              <div id="bannerThree" class="banners"><?php echo zen_display_banner('static', $banner); ?></div>
                              <?php
    }
  }
?>
                              <!-- bof upload alerts -->
                              <?php if ($messageStack->size('upload') > 0) echo $messageStack->output('upload'); ?>
                              <!-- eof upload alerts -->
                              <?php
 /**
  * prepares and displays center column
  *
  */
 require($body_code); ?>
                              <?php
  if (SHOW_BANNERS_GROUP_SET4 != '' && $banner = zen_banner_exists('dynamic', SHOW_BANNERS_GROUP_SET4)) {
    if ($banner->RecordCount() > 0) {
?>
                              <div id="bannerFour" class="banners"><?php echo zen_display_banner('static', $banner); ?></div>
                              <?php
    }
  }
?></td>
                            </tr>
                          </table></td>
                        </tr>
                        <tr>
                          <td>&nbsp;</td>
                        </tr>

                      </table></td>
                    </tr>
                  </table></td>
                </tr>

              </table></td>
              <td valign="top" class="bg_side"><table width="100%" border="0" cellspacing="0" cellpadding="0">
                <tr>
                  <td><table width="100%" border="0" cellspacing="0" cellpadding="0">
                    <tr>
                      <td valign="top" class="bg_browse"><table width="100%" border="0" cellspacing="0" cellpadding="0">                       
					  <tr>
					  	<td><img src="<? echo DIR_WS_TEMPLATE; ?>images/spacer.gif" width="198" height="5" alt="" /></td>
					  </tr>
					  <tr>
                          <td><table align="center" width="192" border="0" cellspacing="0" cellpadding="0">
                            <tr>
                              <td><?php require(DIR_WS_TEMPLATE .('modules/column_right.php')); ?></td>
                            </tr>
                          </table></td>
                        </tr>                        
                      </table></td>
                      <td width="14" valign="top"><img src="<? echo DIR_WS_TEMPLATE; ?>images/side03.gif" width="14" height="67" alt="" /></td>
                    </tr>
                  </table></td>
                </tr>

              </table></td>
            </tr>
          </table></td>
        </tr>
        <tr>
          <td><img src="<? echo DIR_WS_TEMPLATE; ?>images/spacer.gif" width="100" height="5" alt="" /></td>
        </tr>
        <tr>
          <td height="25" bgcolor="#521309"><table width="98%" border="0" align="center" cellpadding="0" cellspacing="0">
            <tr>
              <td width="73%" height="29" class="txt_content05"><a href="index.php?main_page=shippinginfo">Shipping &amp; Returns</a>  |   <a href="index.php?main_page=privacy">Privacy Notice</a>  |   <a href="index.php?main_page=conditions">Conditions of Use</a>  |   <a href="index.php?main_page=contact_us">Contact Us</a>  |   <a href="index.php?main_page=specials">Specials</a>  |   <a href="index.php?main_page=reviews">Reviews</a></td>
              <td width="27%"><div align="right" class="txt_content05">
                <div align="center">Powered by P0902m - GroupZencart</div>
              </div></td>
            </tr>
          </table></td>
        </tr>
        <tr>
          <td height="5"><img src="<? echo DIR_WS_TEMPLATE; ?>images/spacer.gif" width="100" height="5" alt="" /></td>
        </tr>
      </table></td>
    </tr>
  </table>
</body>